package com.zhang.controller.config;


import com.zhang.util.ResultVO;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author gao
 * @time 2022/01/23 15:03:00
 */
@ControllerAdvice
@ResponseBody
public class MyControllerAdvice {

    @ExceptionHandler(Exception.class)
    public ResultVO f1(Exception e) {
        return ResultVO.failure("操作失败", e.toString());
    }
}
